<?php //debug($ordenesTags);   ?>
<?php 
    echo $this->Html->script(array(
        'print'
    )); 
?>
<div class="grid12">
    <div class="widget">
        <div id="areaImprimir">
        <div class="whead"><h6>Detalle de la orden</h6><div class="clear"></div></div>
        <div class="body" align="left">
            <h2>DETALLE DE CONTRATOS</h2>
        </div>

    <h4>DETALLE</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Codigo</b></td>
            <td><?php echo $cont['Contrato']['codigo'];?></td> 
            <td><b>Descripcion</b></td>
            <td><?php echo $cont['Contrato']['descripcion'];?></td>
    </tr>
    
    <tr>
            <td><b>Proveedor</b></td>
            <td><?php echo $cont['Contrato']['proveedor'];?></td>
    </tr>



    </table>
    <?php endforeach; ?>
    <h4>MONTO</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Field Work Order</b></td>
            <td><?php echo $cont['Contrato']['monto1'];?></td> 
            <td><b>Changue Work Order</b></td>
            <td><?php echo $cont['Contrato']['monto2'];?></td>
    </tr>
    
    <tr>
            <td><b>Contrato</b></td>
            <td><?php echo $cont['Contrato']['monto3'];?></td> 

    </tr>



    </table>
    <?php endforeach; ?>
    
    <h4>DETALLE DE DOCUMENTOS</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>IAP</b></td>
            <td><?php echo $cont['Contrato']['IAP'];?></td> 
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['volumen'];?></td>
    </tr>
    
    <tr>
            <td><b>IAP UBICACION</b></td>
            <td><?php echo $cont['Contrato']['IAP_ubicacion'];?></td> 
            <td><b>EXISTE</b></td>
            <td><?php echo $cont['Contrato']['existe'];?></td>
    </tr>
    
    <tr>
            <td><b>DOCUMENTO CONTRACTUAL</b></td>
            <td><?php echo $cont['Contrato']['original'];?></td> 
            <td><b>CANTIDAD DE FIRMAS</b></td>
            <td><?php echo $cont['Contrato']['cantidad_firmas'];?></td>
    </tr>

    <tr>
            <td><b>DC UBICACION</b></td>
            <td><?php echo $cont['Contrato']['DC_ubicacion'];?></td>
            <td><b>OBSERVACIONES</b></td>
            <td><?php echo $cont['Contrato']['observaciones'];?></ 
    </tr>

    </table>
    <?php endforeach; ?>
    
    <div class="body" align="left">
            <h2>DETALLE DE DOCUMENTACION</h2>
    </div>
    
    <h4>General Correspondance</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['gc_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['gc_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>Bidders List o RFP</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['blr_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['blr_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>Bid Documents</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['bd_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['bd_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>Subcontract Document(s)</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['sd_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['sd_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>Insurance and Lien Notices</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['iln_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['iln_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>Progress Reports</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['pr_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['pr_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>Invoice</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['i_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['i_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>Schedule</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['sc_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['sc_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>Meeting Minutes</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['mm_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['mm_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>Project Control Weekly / Daily</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['pcw_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['pcw_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>QA / QC</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['qa_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['qa_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>Safety</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['s_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['s_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>Field Work Order & CCAF'S</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['fwo_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['fwo_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>Change Work Order</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['cwo_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['cwo_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>Contract Register</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['cr_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['cr_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>Claims</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['c_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['c_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>Contract Close - Out Process</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['cco_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['cco_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    <h4>Paymente Request</h4>
    <?php foreach ($detalle as $cont): ?>
    <table cellpadding="0" cellspacing="0" width="100%" class="tAlt">
    <tr>
            <td><b>Volumen</b></td>
            <td><?php echo $cont['Contrato']['par_volumen'];?></td> 
            <td><b>Caja</b></td>
            <td><?php echo $cont['Contrato']['par_caja'];?></td>
    </tr>
    </table>
    <?php endforeach; ?>
    
    </div>
    
    </div>
</div>

<div class="actions-right">
            <?php echo $this->Html->link("Volver &raquo;", array('controller'=>'Publicos', 'action'=>'generales'), array('class'=>'buttonS bLightBlue', 'escape' => FALSE)); ?>
</div>
<p></p>

<input type="button" class="buttonS bGreen" value="Imprimir" id="btnImprimir" />

<script type="text/javascript">
   $(document).ready(function() {

         $("#btnImprimir").click(function() {
            //console.log('click');
             printElem({ leaveOpen: true, printMode: 'popup' });
             //printElem({ overrideElementCSS: ['http://www.epcm.com/css/printable.css'] });
         });


     });
 function printElem(options){
     $('#areaImprimir').printElement(options);
 }

 </script>